<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns:MSHelp="http://www.microsoft.com/MSHelp/" lang="en-us" xml:lang="en-us"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="DC.Type" content="reference">
<meta name="DC.Title" content="Concurrent Growth">
<meta name="DC.subject" content="Concurrent Growth">
<meta name="keywords" content="Concurrent Growth">
<meta name="DC.Relation" scheme="URI" content="../../../reference/containers_overview/concurrent_vector.htm">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="concurrent_growth">
<meta name="DC.Language" content="en-US">
<link rel="stylesheet" type="text/css" href="../../../intel_css_styles.css">
<title>Concurrent Growth</title>
</head>
<body id="concurrent_growth">
 <!-- ==============(Start:NavScript)================= -->
 <script src="..\..\..\NavScript.js" language="JavaScript1.2" type="text/javascript"></script>
 <script language="JavaScript1.2" type="text/javascript">WriteNavLink(3);</script>
 <!-- ==============(End:NavScript)================= -->
<a name="concurrent_growth"><!-- --></a>

 
  <h1 class="topictitle1">Concurrent Growth</h1>
 
   
  <div> 
	 <div class="section"> 
		
<div class="tablenoborder"><table cellpadding="4" summary="" frame="border" border="1" cellspacing="0" rules="all"><span class="tabledesc">The methods described in the following table may be invoked
			 concurrently on the same vector. 
		  </span><thead align="left"> 
				<tr> 
				  <th class="cellrowborder" valign="top" width="33.89830508474576%" id="d56349e31">Member 
				  </th>
 
				  <th class="cellrowborder" valign="top" width="66.10169491525423%" id="d56349e34">Description 
				  </th>
 
				</tr>
</thead>
 
			 <tbody> 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d56349e31 "><span class="keyword"> iterator grow_by( size_type
						delta, const_reference t=T() )</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d56349e34 "> 
					 <p>Appends a sequence comprising 
						<em>delta</em> copies of t to the end of the vector. If 
						<samp class="codeph"><em>t</em></samp> is not specified, the new elements
						are default constructed. 
					 </p>
 
					 <p><strong>Returns</strong>: Iterator pointing to
						beginning of appended sequence. 
					 </p>
 
					 <div class="Note"><h3 class="NoteTipHead">
					Note</h3> 
						<p> Return type was 
						  <samp class="codeph">size_type</samp> in Intel&reg; Threading Building
						  Blocks (Intel&reg; TBB) 2.1. 
						</p>
 
					 </div> 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d56349e31 "><span class="keyword"> iterator grow_to_at_least(
						size_type n )</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d56349e34 "> 
					 <p>Appends minimal sequence of elements such
						that 
						<samp class="codeph">vector.size()&gt;=n</samp>. The new elements are
						default constructed. Blocks until all elements in range 
						<em>[0..n)</em> are allocated (but not necessarily constructed
						if they are under construction by a different thread). 
					 </p>
 
					 <div class="Note"><h3 class="NoteTipHead">
					Tip</h3> 
						<p>If a thread must know whether
						  construction of an element has completed, consider the following technique.
						  Instantiate the 
						  <samp class="codeph">concurrent_vector</samp> using a 
						  <samp class="codeph">zero_allocator</samp>. Define the constructor 
						  <samp class="codeph">T()</samp> such that when it completes, it sets a
						  field of 
						  <samp class="codeph">T</samp> to non-zero. A thread can check whether
						  an item in the 
						  <samp class="codeph">concurrent_vector</samp> is constructed by
						  checking whether the field is non-zero. 
						</p>
 
					 </div> 
					 <p><strong>Returns</strong>: Iterator that points to
						beginning of appended sequence, or pointer to (*this)[n] if no elements were
						appended. 
					 </p>
 
					 <div class="Note"><h3 class="NoteTipHead">
					Note</h3> 
						<p> Return type was 
						  <samp class="codeph">void</samp> in Intel&reg; TBB 2.1. 
						</p>
 
					 </div> 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d56349e31 "><span class="keyword"> iterator push_back(
						const_reference value )</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d56349e34 "> 
					 <p>Appends copy of 
						<samp class="codeph">value</samp> to the end of the vector. 
					 </p>
 
					 <p><strong>Returns</strong> Iterator that points to
						the copy. 
					 </p>
 
					 <div class="Note"><h3 class="NoteTipHead">
					Note</h3> 
						<p> Return type was 
						  <samp class="codeph">size_type</samp> in Intel&reg; TBB 2.1. 
						</p>
 
					 </div> 
				  </td>
 
				</tr>
 
			 </tbody>
 
		  </table>
</div>
 
	 </div>
 
  </div>
 

<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong>&nbsp;<a href="../../../reference/containers_overview/concurrent_vector.htm">concurrent_vector</a></div>
</div>
<div></div>

</body>
</html>
